﻿@inherits CfgBase<axisLine?>
<div class="cfg">
    <div class="over-input">
        <Switch @bind-Value="IsShow" ShowInnerText="true" OffInnerText="默认" OnInnerText="自定义"
                OnValueChanged="ShowChanged" ShowLabel="true" DisplayText="@DisplayText"></Switch>
        <Tooltip Title="@HelpInfo" CustomClass="is-invalid">
            <i style="color:@IsOk()" class="fas fa-circle-question" />
        </Tooltip>
    </div>

    @if (IsShow && ValueHander != null)
    {
        @* <JsTValCfg T="symbol" @bind-Value="ValueHander.symbol" DisplayText="轴端形状" JsTypes="new List<JsType>()"></JsTValCfg> *@
        <JsValueCfg T="symbol" @bind-Value="ValueHander.symbol" DisplayText="轴端形状" JsTypes="new List<JsType>(){ JsType.EnumArray}"></JsValueCfg>

    }
</div>

@code
{
    public string IsOk()
    {
        return ValueHander == null ? "green" : "black";
    }
    async Task ShowChanged(bool val)
    {
        if (val)//选中默认
        {
            ValueHander = new();
        }
        else
        {
            ValueHander = null;
            Update();
        }
        await Task.CompletedTask;
    }







}
